package logic

import (
	"context"
	"dataservice/internal/data"
	"gitee.com/jmdvirus/jkgo/jk/jklog"

	"dataservice/internal/svc"
	"dataservice/internal/types"

	"github.com/tal-tech/go-zero/core/logx"
)

type ZhongChengYaoZhongYaoLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewZhongChengYaoZhongYaoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZhongChengYaoZhongYaoLogic {
	return &ZhongChengYaoZhongYaoLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *ZhongChengYaoZhongYaoLogic) ZhongChengYaoZhongYao(req *types.ZhongChengYaoZhongYaoQuery) (resp *types.ZhongChengYaoZhongYaoList, err error) {
	// todo: add your logic here and delete this line
	jklog.L().Infoln("query zhongyao: ", req.Name)
	resp = data.GetZhongChengYaoZhongYaoCai(*req)
	return resp, nil
}
